/*
门店 & 广告位 & 活动地点 管理
*/

import {
  request,
  requestSync
} from '@/utils/request'


// 门店列表
export function shopList(data) {
  return requestSync({
    url: '/system/advertising/shopList',
    method: 'post',
    data
  })
}

//删除
export function deleteAdvertising(advertisingId) {
  return requestSync({
    url: '/system/advertising/deleteAdvertising',
    method: 'post',
    data: {
      advertisingId
    }
  })
}


// 上线
export function onlineAdvertising(advertisingId) {
  return requestSync({
    url: '/system/advertising/onlineAdvertising',
    method: 'post',
    data: {
      advertisingId
    }
  })
}

// 下线
export function offlineAdvertising(advertisingId) {
  return requestSync({
    url: '/system/advertising/offlineAdvertising',
    method: 'post',
    data: {
      advertisingId
    }
  })
}


// 添加-门店
export function addShop(data) {
  return requestSync({
    url: '/system/advertising/addShop',
    method: 'post',
    data
  })
}

//获取详情
export function advertisingInfo(advertisingId) {
  return requestSync({
    url: '/system/advertising/advertisingInfo',
    method: 'post',
    data: {
      advertisingId
    }
  })
}

// 修改-门店
export function updateShop(data) {
  return requestSync({
    url: '/system/advertising/updateShop',
    method: 'post',
    data
  })
}

// 所有位置列表
export function listAllAdvertising() {
  return requestSync({
    url: '/system/advertising/listAllAdvertising',
    method: 'post',
  })
}

// 所有门店列表
export function listAllShopList() {
  return requestSync({
    url: '/system/advertising/listAllShopList',
    method: 'post',
  })
}

